<?php

// function untuk menampilkan halaman meta & header
function getMeta() {
	
	?>
	<!DOCTYPE html>
	<html lang="en">
	  <head>
	    <meta charset="utf-8">
	    <title>DISKIMRUM GIS : Operator</title>
	    <meta name="viewport" content="width=device-width, initial-scale=1.0">
	    <meta name="description" content="">
	    <meta name="author" content="">
		
	    <!-- Le styles -->
	    <link href="../assets/css/bootstrap.css" rel="stylesheet">
	    <style>
	      body {
	        padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
	      }
	    </style>
	    <link href="../assets/css/bootstrap-responsive.css" rel="stylesheet">
		<link rel="stylesheet" href="../assets/js/chosen/chosen.css" />
	    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
	    <!--[if lt IE 9]>
	      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
	    <![endif]-->
	
	    <!-- Le fav and touch icons -->
	    <link rel="shortcut icon" href="../assets/ico/favicon.ico">
	    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="../assets/ico/apple-touch-icon-144-precomposed.png">
	    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="../assets/ico/apple-touch-icon-114-precomposed.png">
	    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="../assets/ico/apple-touch-icon-72-precomposed.png">
	    <link rel="apple-touch-icon-precomposed" href="../assets/ico/apple-touch-icon-57-precomposed.png">
	  </head>
	<?php
	
}

// function untuk menampilkan menu navigasi
function getNav() {
	
	?>
	 <div class="navbar navbar-fixed-top">
      <div class="navbar-inner">
        <div class="container">
          <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </a>
          <a class="brand" href="#">DISKIMRUM GIS</a>
          <div class="btn-group pull-right">
            <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
              <i class="icon-user"></i><?php echo $_SESSION['username']; ?><span class="caret"></span>
            </a>
            <ul class="dropdown-menu">
              <li><a href="#">Profile</a></li>
              <li class="divider"></li>
              <li><a href="logout.php">Sign Out</a></li>
            </ul>
          </div>
          <div class="nav-collapse">
            <ul class="nav nav-pills">
              <li class="dropdown" id="menu2">
				<a class="dropdown-toggle" data-toggle="dropdown" href="#menu2">Rekomendasi</a>
					<ul class="dropdown-menu">
					  <li><a href="?page=kriteria">Kriteria</a></li>
					  <li><a href="?page=alternatif">Alternatif</a></li>
					  <li><a href="?page=penilaian">Penilaian</a></li>
					
					</ul>
              </li>
              
               <li class="dropdown" id="menu3">
				<a class="dropdown-toggle" data-toggle="dropdown" href="#menu3">Data Master</a>
					<ul class="dropdown-menu">
					  <li><a href="?page=kabupaten">Kabupaten</a></li>
					  <li><a href="?page=sektoral">Sektoral</a></li>
					  <li><a href="?page=kegiatan">Kegiatan</a></li>
					</ul>
              </li>
             
            </ul>
          </div><!--/.nav-collapse -->
        </div>
      </div>
    </div>
	<?php
	
}

function getFooter() {
	
	?>
	  <hr>
	  <footer>
        <p>&copy;DISKIMRUM GIS 2012</p>
      </footer>
	<?php
}

function getJS() {
	?>
		<!-- Le javascript
	    ================================================== -->
	    <!-- Placed at the end of the document so the pages load faster -->
	    <script src="../assets/js/jquery.js"></script>
	    <script src="../assets/js/bootstrap-transition.js"></script>
	    <script src="../assets/js/bootstrap-alert.js"></script>
	    <script src="../assets/js/bootstrap-modal.js"></script>
	    <script src="../assets/js/bootstrap-dropdown.js"></script>
	    <script src="../assets/js/bootstrap-scrollspy.js"></script>
	    <script src="../assets/js/bootstrap-tab.js"></script>
	    <script src="../assets/js/bootstrap-tooltip.js"></script>
	    <script src="../assets/js/bootstrap-popover.js"></script>
	    <script src="../assets/js/bootstrap-button.js"></script>
	    <script src="../assets/js/bootstrap-collapse.js"></script>
	    <script src="../assets/js/bootstrap-carousel.js"></script>
	    <script src="../assets/js/bootstrap-typeahead.js"></script>
	    <script src="../assets/js/chosen/chosen.jquery.js" type="text/javascript"></script>
		<script type="text/javascript" src="../assets/js/jquery.validate.js"></script>
		<script type="text/javascript"> $(".chzn-select").chosen(); $(".chzn-select-deselect").chosen({allow_single_deselect:true}); </script>
		<!-- <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> -->
		<script type="text/javascript">
		$(document).ready(function(){
			$('input').hover(function()
			{
			$(this).popover('show')
		});
			$("#registerHere").validate({
				rules:{
					name:"required",
					username:"required",
					email:{
							required:true,
							email: true
						},
					password:{
						required:true,
						minlength: 6
					},
					confirmpass:{
						required:true,
						equalTo: "#password"
					},
					gender:"required"
				},
				messages:{
					name:"Masukkan nama pegawai",
					username:"Masukkan username",
					email:{
						required:"Masukkan alamat email",
						email:"Alamat email tidak valid"
					},
					password:{
						required:"Masukkan password",
						minlength:"Password minimal mempunyai 6 karakter"
					},
					confirmpass:{
						required:"Masukan konfirmasi password",
						equalTo:"Password dan konfirmasi password tidak sama"
					},
					gender:"Select Gender"
				},
				errorClass: "help-inline",
				errorElement: "span",
				highlight:function(element, errorClass, validClass) {
					$(element).parents('.control-group').addClass('error');
				},
				unhighlight: function(element, errorClass, validClass) {
					$(element).parents('.control-group').removeClass('error');
					$(element).parents('.control-group').addClass('success');
				}
			});
		});
	  </script>
  
	<?php
}
